package com.zhx.real.advice.config;

import com.zhx.real.advice.advice.CommonResponseDataAdvice;
import com.zhx.real.advice.advice.GlobalExceptionAdvice;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhanghaixuan
 * @date 2019-05-06 22:22
 * description: springboot 自动装配配置
 */
@Configuration
public class AdviceConfig {

    @Bean
    public CommonResponseDataAdvice commonResponseDataAdvice(){
        return new CommonResponseDataAdvice();
    }


    @Bean
    public GlobalExceptionAdvice myGlobalExceptionAdvice(){
        return new GlobalExceptionAdvice();
    }
}
